<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEnrolmentTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_enrolmentID}" for="enrolmentID" />
                    <h:inputText id="enrolmentID" value="#{enrolmentController.selected.enrolmentID}" title="#{bundle.CreateEnrolmentTitle_enrolmentID}" required="true" requiredMessage="#{bundle.CreateEnrolmentRequiredMessage_enrolmentID}"/>
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_isPayment}" for="isPayment" />
                    <h:inputText id="isPayment" value="#{enrolmentController.selected.isPayment}" title="#{bundle.CreateEnrolmentTitle_isPayment}" />
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_enrolDate}" for="enrolDate" />
                    <h:inputText id="enrolDate" value="#{enrolmentController.selected.enrolDate}" title="#{bundle.CreateEnrolmentTitle_enrolDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_payDate}" for="payDate" />
                    <h:inputText id="payDate" value="#{enrolmentController.selected.payDate}" title="#{bundle.CreateEnrolmentTitle_payDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_payValue}" for="payValue" />
                    <h:inputText id="payValue" value="#{enrolmentController.selected.payValue}" title="#{bundle.CreateEnrolmentTitle_payValue}" />
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_studentID}" for="studentID" />
                    <h:selectOneMenu id="studentID" value="#{enrolmentController.selected.studentID}" title="#{bundle.CreateEnrolmentTitle_studentID}" >
                        <f:selectItems value="#{studentController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_paymentID}" for="paymentID" />
                    <h:selectOneMenu id="paymentID" value="#{enrolmentController.selected.paymentID}" title="#{bundle.CreateEnrolmentTitle_paymentID}" >
                        <f:selectItems value="#{paymentController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateEnrolmentLabel_eventID}" for="eventID" />
                    <h:selectOneMenu id="eventID" value="#{enrolmentController.selected.eventID}" title="#{bundle.CreateEnrolmentTitle_eventID}" >
                        <f:selectItems value="#{eventController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{enrolmentController.create}" value="#{bundle.CreateEnrolmentSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{enrolmentController.prepareList}" value="#{bundle.CreateEnrolmentShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateEnrolmentIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
